<?php
require('../database/db.php');
$mysql=new mysql();
$ordersid=$_REQUEST['ordersid'];
$danhao=$_REQUEST['danhao'];
$kuaidi=$_REQUEST['kuaidi'];
if ($ordersid && $danhao && $kuaidi) {
	$sql = "UPDATE goodsorders SET danhao='".$danhao."',kuaidi='".$kuaidi."' where ordersid=".$ordersid;
	$mysql->query($sql);
	if ($mysql->affected_rows()>0) {
		$arr = array('code' => 100, 'tip' => '添加成功');
	}else{
		$arr = array('code' => 300, 'tip' => '添加失败');
	}
}else{
	$arr = array('code' => 200, 'tip' =>'参数传入有误,必传入参数:订单id=>ordersid,快递单号=>danhao,快递公司id=>kuaidi');
}
echo json_encode($arr);
?>